export const useAuth = () => {
    const isLoggedIn = useState<boolean>('isLoggedIn', () => {
        return localStorage.getItem('isLoggedIn') === 'true'
    });

    const login = () => {
        isLoggedIn.value = true
        localStorage.setItem('isLoggedIn', 'true')
    }

    const logout = () => {
        isLoggedIn.value = false
        localStorage.removeItem('isLoggedIn')
    }

    return {
        isLoggedIn,
        login,
        logout,
    }

}
